home *** CD-ROM | disk | FTP | other *** search
/ Inside Multimedia 1994 April / Inside Multimedia CD-ROM (April 1994).iso / prg / gs / gssource.exe / BCWIN.MAK < prev    next >
Encoding:
Text File  |  1992-08-24  |  7.1 KB  |  247 lines

  1. #    Copyright (C) 1989, 1992 Aladdin Enterprises.  All rights reserved.
  2. #    Distributed by Free Software Foundation, Inc.
  3. #
  4. # This file is part of Ghostscript.
  5. #
  6. # Ghostscript is distributed in the hope that it will be useful, but
  7. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. # to anyone for the consequences of using it or for whether it serves any
  9. # particular purpose or works at all, unless he says so in writing.  Refer
  10. # to the Ghostscript General Public License for full details.
  11. #
  12. # Everyone is granted permission to copy, modify and redistribute
  13. # Ghostscript, but only under the conditions described in the Ghostscript
  14. # General Public License.  A copy of this license is supposed to have been
  15. # given to you along with Ghostscript so you can know your rights and
  16. # responsibilities.  It should be in a file named COPYING.  Among other
  17. # things, the copyright notice and this notice must be preserved on all
  18. # copies.
  19.  
  20. # makefile for Ghostscript, MS-Windows 3.n/Borland C++ 3.0 or 3.1 platform.
  21.  
  22. # ------------------------------- Options ------------------------------- #
  23.  
  24. ###### This section is the only part of the file you should need to edit.
  25.  
  26. # ------ Generic options ------ #
  27.  
  28. # Define the default directory/ies for the runtime
  29. # initialization and font files.  Separate multiple directories with \;.
  30. # Use / to indicate directories, not a single \.
  31.  
  32. GS_LIB_DEFAULT=c:/gs\;c:/gs/fonts
  33.  
  34. # Define the name of the Ghostscript initialization file.
  35. # (There is no reason to change this.)
  36.  
  37. GS_INIT=gs_init.ps
  38.  
  39. # Choose generic configuration options.
  40.  
  41. # Setting DEBUG=1 includes debugging features (-Z switch) in the code.
  42. # Code runs substantially slower even if no debugging switches are set,
  43. # and also takes about another 25K of memory.
  44.  
  45. DEBUG=0
  46.  
  47. # Setting TDEBUG=1 includes symbol table information for the Borland debugger.
  48. # No execution time or space penalty, just larger .OBJ and .EXE files
  49. # and slower linking.
  50.  
  51. TDEBUG=0
  52.  
  53. # Setting NOPRIVATE=1 makes private (static) procedures and variables public,
  54. # so they are visible to the debugger and profiler.
  55. # No execution time or space penalty, just larger .OBJ and .EXE files.
  56.  
  57. NOPRIVATE=0
  58.  
  59. # ------ Platform-specific options ------ #
  60.  
  61. # If you don't have an assembler, set USE_ASM=0.  Otherwise, set USE_ASM=1,
  62. # and set ASM to the name of the assembler you are using.  This can be
  63. # a full path name if you want.  Normally it will be masm or tasm.
  64.  
  65. USE_ASM=1
  66. ASM=tasm
  67.  
  68. # Define the drive, directory, and compiler name for the Turbo C files.
  69. # COMP is the compiler name (tcc for Turbo C++, bcc for Borland C++).
  70. # COMPDIR contains the compiler and linker (normally \bc\bin).
  71. # INCDIR contains the include files (normally \bc\include).
  72. # LIBDIR contains the library files (normally \bc\lib).
  73. # Note that these prefixes are always followed by a \,
  74. #   so if you want to use the current directory, use an explicit '.'.
  75.  
  76. COMP=bcc
  77. COMPDIR=c:\bc\bin
  78. INCDIR=c:\bc\include
  79. LIBDIR=c:\bc\lib
  80.  
  81. # Windows 3.n requires a 286 CPU or higher.
  82.  
  83. CPU_TYPE=286
  84.  
  85. # Don't rely on FPU for Windows.
  86.  
  87. FPU_TYPE=0
  88.  
  89. # ---------------------------- End of options ---------------------------- #
  90.  
  91. # Swapping `make' out of memory makes linking much faster.
  92.  
  93. .swap
  94.  
  95. # Define the platform name.
  96.  
  97. PLATFORM=bcwin_
  98.  
  99. # Define the name of the makefile -- used in dependencies.
  100.  
  101. MAKEFILE=bcwin.mak
  102.  
  103. # Define the ANSI-to-K&R dependency.  Turbo C accepts ANSI syntax,
  104. # but we need to preconstruct ccf.tr to get around the limit on
  105. # the maximum length of a command line.
  106.  
  107. AK=ccf.tr
  108.  
  109. # Define the compilation flags for an 80286.
  110. # This is void because we handle -2 and -3 in ccf.tr (see below).
  111.  
  112. F286=
  113.  
  114. # Figure out which version of Borland C++ we are running.
  115. # In the MAKE program that comes with Borland C++ 2.0, __MAKE__ is 0x300;
  116. # in the MAKE that comes with Borland C++ 3.0 and 3.1, it is 0x360.
  117. # We care because 3.0 has additional optimization features.
  118. # There are also some places below where we distinguish BC++ 3.1 from 3.0
  119. #   by testing whether $(INCDIR)\win30.h exists (true in 3.1, false in 3.0).
  120.  
  121. EXIST_BC3_1=exist $(INCDIR)\win30.h
  122.  
  123. !if $(__MAKE__) >= 0x360
  124. CO=-Obe -Z
  125. !else
  126. CO=-O
  127. !endif
  128.  
  129. !include "tccommon.mak"
  130.  
  131. # Define the compilation flags.
  132.  
  133. !if $(NOPRIVATE)
  134. CP=-DNOPRIVATE
  135. !else
  136. CP=
  137. !endif
  138.  
  139. !if $(DEBUG) | $(TDEBUG)
  140. CS=-N
  141. !else
  142. CS=
  143. !endif
  144.  
  145. !if $(DEBUG)
  146. CD=-DDEBUG
  147. !else
  148. CD=
  149. !endif
  150.  
  151. !if $(TDEBUG)
  152. CT=-v
  153. LCT=/v
  154. !else
  155. CT=-y
  156. LCT=/m /l
  157. !endif
  158.  
  159. GENOPT=$(CP) $(CS) $(CD) $(CT)
  160.  
  161. CCFLAGS=$(GENOPT) $(PLATOPT) $(FPFLAGS) -m$(MM)
  162. CC=$(COMPDIR)\$(COMP) @ccf.tr
  163. CCC=$(CC) -W $(CO) -c
  164. CCD=$(CC) -W -O -c
  165. CC0=$(CC) -W -c
  166. CCINT=$(CC) -W -c
  167.  
  168. .c.obj:
  169.     $(CCC) { $<}
  170.  
  171. # ------ Devices and features ------ #
  172.  
  173. # Choose the language feature(s) to include.  See gs.mak for details.
  174. # Since Ghostscript runs in enhanced mode, we include a fair number
  175. # of drivers, but we can't exceed 64K of static data.
  176.  
  177. FEATURE_DEVS=
  178.  
  179. # Choose the device(s) to include.  See devs.mak for details.
  180.  
  181. DEVICE_DEVS=mswin.dev epson.dev bj10e.dev paintjet.dev
  182. DEVICE_DEVS2=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev
  183. DEVICE_DEVS4=gifmono.dev gif8.dev pcxmono.dev pcx16.dev pcx256.dev bit.dev
  184. !include "gs.mak"
  185. !include "devs.mak"
  186.  
  187. # Build the compiler response file depending on the selected options.
  188.  
  189. ccf.tr: $(MAKEFILE) makefile
  190.     echo -2 -a -d -r -G -N -X -I$(INCDIR) $(CCFLAGS) -DCHECK_INTERRUPTS >ccf.tr
  191. !if $(CPU_TYPE) > 286
  192.     echo -3 -a -d -r -G -N -X -I$(INCDIR) $(CCFLAGS) -DCHECK_INTERRUPTS >_temp_
  193.     if $(EXIST_BC3_1) copy _temp_ ccf.tr
  194. !endif
  195.  
  196. # -------------------------------- Library -------------------------------- #
  197.  
  198. # The Turbo/Borland C(++), Microsoft Windows platform
  199.  
  200. bcwin__=gp_mswin.$(OBJ) gp_msdos.$(OBJ)
  201. bcwin_.dev: $(bcwin__)
  202.     $(SHP)gssetmod bcwin_ $(bcwin__)
  203.  
  204. gp_mswin.$(OBJ): gp_mswin.c gp_mswin.h $(memory__h) $(string__h)  \
  205.  $(gx_h) $(gp_h) $(gpcheck_h) $(gserrors_h) $(gxdevice_h)
  206.  
  207. gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h)
  208.  
  209. # ----------------------------- Main program ------------------------------ #
  210.  
  211. BEGINFILES=gs.res gs*.ico
  212.  
  213. iutilasm.$(OBJ): iutilasm.asm
  214.  
  215. # Get around the fact that the DOS shell has a rather small limit on
  216. # the length of a command line.  (sigh)
  217.  
  218. LIBCTR=libc$(MM).tr
  219.  
  220. $(LIBCTR): $(MAKEFILE) makefile
  221.     echo $(LIBDIR)\import $(LIBDIR)\mathw$(MM) $(LIBDIR)\cw$(MM) >$(LIBCTR)
  222.  
  223. LIBDOS=$(LIB) obj.tr
  224.  
  225. # Interpreter main program
  226.  
  227. ICONS=gsgraph.ico gstext.ico
  228.  
  229. GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ)\
  230.   $(LIBDOS) $(LIBCTR) obj.tr lib.tr gs.res gs.def $(ICONS)
  231.  
  232. # Make the icons from their text form.
  233.  
  234. gsgraph.ico: gsgraph.icx echogs$(XE)
  235.     echogs -wb gsgraph.ico -n -X -r gsgraph.icx
  236.  
  237. gstext.ico: gstext.icx echogs$(XE)
  238.     echogs -wb gstext.ico -n -X -r gstext.icx
  239.  
  240. gs.res: gs.rc gp_mswin.h $(ICONS)
  241.     $(COMPDIR)\rc -i$(INCDIR) -r gs
  242.  
  243. gs.exe: $(GS_ALL)
  244.     tlink $(LCT) /Twe $(LIBDIR)\c0w$(MM) @obj.tr $(INTASM) @gs.tr ,gs,gs,@lib.tr @$(LIBCTR),gs.def
  245.     if $(EXIST_BC3_1) $(COMPDIR)\rc -30 -i$(INCDIR) gs
  246.     if not $(EXIST_BC3_1) $(COMPDIR)\rc -i$(INCDIR) gs
  247.